package com.atguigu.service.impl;

import com.alibaba.dubbo.config.annotation.Service;

import com.atguigu.dao.UserDao;
import com.atguigu.pojo.User;
import com.atguigu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author LEO
 * @Date 2021年12月23日 16:07
 */
@Service(interfaceClass= UserService .class)  //发布服务，注册到zk中心
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    public User findUserByUsername(String username) {
        User user = userDao.findUserByUsername(username);
        return user;
    }
}
